Skip to content

Conversation

@jsundai
Copy link
Contributor

@jsundai jsundai commented Nov 13, 2025

What does this PR do?

https://temporal-documentation-git-tutorial-layout-money-transfe-0fc0c4.preview.thundergun.io/build-your-first-basic-workflow/build-your-first-workflow

Notes to reviewers

files changed include new components for interaction and sdk boxed logos
wip (TODO: make light mode friendly)
aiming for: concise + engaging, dev-to-dev tone, consistent interactions, progressive disclosure.
next iteration: can include sdk box logos

@jsundai jsundai requested a review from a team as a code owner November 13, 2025 20:00
@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Jan 22, 2026 4:40am

Request Review

@jsundai jsundai changed the title tutorial layout money transfer experimentation build your first basic workflow experimentation Nov 13, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026


</SdkTabs.Java>

<SdkTabs.TypeScript>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing, but could we have the text wrap button in here like we have on other code blocks for all of these on the page? Example

import type { PaymentDetails } from './shared';

// highlight-next-line
export async function moneyTransfer(details: PaymentDetails): Promise<string> { // Workflow Definition: an exported async function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could the // Workflow Definition: an exported async function go above // highlight-next-line to keep it consistent with all the other comments?

let withdrawResult: string;
try {
// highlight-next-line
withdrawResult = await withdraw(details); // Executes Activity via proxy and waits for result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could // Executes Activity via proxy and waits for result go above // highlight-next-line to keep it consistent with all the other comments?

</div>
}>

Now that your Worker is running and polling for tasks, you can start a Workflow Execution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have missed it, but was there somewhere we told the users they would need 3 terminals? It confused me for a second that the first terminal we talked about under the text is Terminal 3.

</SdkTabs>
</div>
<div style={{marginTop: '2rem', padding: '1rem', background: 'rgba(16, 185, 129, 0.1)', borderRadius: '0.5rem'}}>
<strong>Expected Success Output:</strong>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we put which terminal this should show in? It looks like Terminal 2.


## Check the Temporal Web UI

<SetupStep code={
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could this open in a new tab instead of the docs one?

const bank = new BankingService('bank2.example.com');

// Comment out this working line:
// return await bank.deposit(details.targetAccount, details.amount, details.referenceId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might just be a formatting thing, but this looks different than the repo and the comment/uncomment snippets are in a different order (the good code is on top of the bug code).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'll review all the code snippets and make sure it matches the repo. I added in some comments but it might be better to remove them for consistency.

Try this advanced scenario of compensating transactions.


1. **Modify the retry policy** in `workflows.py` to only retry 1 time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we only want to highlight Python here or all the languages?

jsundai and others added 2 commits January 21, 2026 22:37
….mdx

Co-authored-by: Milecia McG <47196133+flippedcoder@users.noreply.github.com>
….mdx

Co-authored-by: Milecia McG <47196133+flippedcoder@users.noreply.github.com>
cd money-transfer-project-template-python
</CodeSnippet>
<CodeSnippet language="bash">
python -m pip install temporalio
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the virtual env set up commands here?

python -m venv .venv
source .venv/bin/activate
python -m pip install temporalio

**workflows.py**

```python
from datetime import timedelta
Copy link
Contributor

@flippedcoder flippedcoder Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this code is hard-coded in the docs instead of using snipsync. Is that something we want to do or could the highlights be added directly to the code repo so everything stays consistent?

workflow.logger.info(
f"Refund successful. Confirmation ID: {refund_output}"
)
raise deposit_err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from shared import PaymentDetails

class BankingActivities:
# highlight-next-line
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be included to show where self.bank comes from.


```python
# Task Queue name - used by both Worker and Workflow starter
MONEY_TRANSFER_TASK_QUEUE_NAME = "MONEY_TRANSFER_TASK_QUEUE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if this should match the repo.

**run_workflow.py**

```python
import asyncio
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused here. This code is different from the repo file. Could we use the snipsync here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The green text is a bit hard to see on light mode.

## Step 4: Define the Task Queue

A Task Queue is where Temporal Workers look for Tasks about Workflows and Activities to execute.
Each Task Queue is identified by a name, which you will specify when you configure the Worker and again in the code that starts the Workflow Execution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a good place to mention that mismatched task queues don't result in error but result in workers not getting any task? I think it's a good callout to make and it'd be short


### Step 3: Simulate the Crash

**The moment of truth!** Kill your Worker while it's processing the transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I maybe not have the latest code for the workflow? Because right now if I follow this sequence, the transfer completes almost instantly and I don't really get to stop the worker while it's processing the transaction


Before you begin, set up your local development environment:

<CallToAction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's out of scope for this, but just wanted to point out that there isn't a PHP quick start. 😅


This is what the Workflow Definition looks like for the money transfer process:

**MoneyTransfer.php**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might help to have the full path here. I had to click around a little before I found the file. src/Workflow/MoneyTransfer.php


Activities handle the business logic. Each Activity method calls an external banking service:

**BankingActivity.php**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might help to have the full path here. I had to click around a little before I found the file. src/Banking/Internal/BankingActivity.php

declare(strict_types=1);

namespace App\Banking\Internal;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$data->amount,
$referenceId,
);
// In Part 2, uncomment the block below and comment out the line above
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if you want this Part 2 comment here.


<SdkTabs.PHP>

**Worker.php**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to include the path here too, like with the others. src/worker.php

**shared.php** or in your Worker.php

```php
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find a reference to this anywhere in the PHP repo. This probably needs to be added to it.


<SdkTabs.PHP>

**transfer.php**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be src/transfer.php to match the others.

cd money-transfer-project-template-php
</CodeSnippet>
<CodeSnippet language="bash">
composer install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the money-transfer repo for this can't install the packages with just this command. 😅 I had to run composer update --ignore-platform-req=ext-grpc and then composer install --ignore-platform-req=ext-grpc to get the install to work. But when I tried to run php src/transfer.php, it actually needs grpc to make the calls. So I don't think a user could easily run this without digging into it.

@brianmacdonald-temporal
Copy link
Contributor

.NET feedback: I think there may be some versioning issues in .NET. Although .NET 10 is the current version, and uses a slightly different program architecture, I needed to install .NET 8 to get the worker to run.


<SdkTabs.DotNet>

**Shared/Constants.cs**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shared/Constants.cs isn't included in the sample repo. It's the only file in the .NET example that I had to create manually. We should probably update the example rather than making a change to the instructions.

<CodeSnippet language="bash">npm run worker</CodeSnippet>
</SdkTabs.TypeScript>
<SdkTabs.DotNet>
<CodeSnippet language="bash">dotnet run --project MoneyTransferWorker</CodeSnippet>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As best I can tell, this needs to include the file extension to work.
dotnet run --project MoneyTransferWorker.csproj

<CodeSnippet language="bash">npm run client</CodeSnippet>
</SdkTabs.TypeScript>
<SdkTabs.DotNet>
<CodeSnippet language="bash">dotnet run --project MoneyTransferClient</CodeSnippet>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this needs the .csproj extension in order to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants